//    Copyright (C) Kherty.  All rights reserved.
using System;
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    public class IconFilter : Filter
    {
        internal override void ReadXmlCore(ReadContext context)
        {
            using (ReadContext c = context.Read(xmlName))
            {
                IconSet = c.GetEnum<IconSetType>("iconSet");
                IconId = c.GetOptionalInteger("iconId");
            }
        }
        const string xmlName = "iconFilter";

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write(xmlName))
            {
                c.SetEnum("iconSet", IconSet);
                c.SetOptionalInteger("iconId", IconId);
            }
        }
        private IconSetType _iconSet;

        public IconSetType IconSet
        {
            get { return _iconSet; }
            set { _iconSet = value; }
        }
        private int? _iconId;

        public int? IconId
        {
            get { return _iconId; }
            set { _iconId = value; }
        }


        internal override bool GetValue(Cell cell, RangeAddress rangeAddress)
        {
            throw new NotImplementedException();;
        }
        internal override Func<Cell, bool> GetCellEvaluator(Range range)
        {
            throw new NotImplementedException();
        }
    }
}